package dfrz.com.util;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;

/**
 * @author PuXiaLing
 * @description: TODO
 * @date 2023/12/22 16:36
 */
public class BaseMapper {
    public int modify(String sql) {
        try {
            //获取连接
            Connection conn = DBHelper.getConn();
            Statement stmt =  conn.createStatement();
            int row=stmt.executeUpdate(sql);
            //关闭连接
            DBHelper.closeConn(stmt,conn);
            return row;
        } catch (SQLException e) {
            e.printStackTrace();
        }

        return 0;
    }
}
